package com.valveinspectionsys.util;

import java.util.ArrayList;
import java.util.List;

import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

import com.valveinspectionsys.base.BaseDao;
import com.valveinspectionsys.dbhelp.DbTableName;

public class TestDao extends BaseDao{
    private SQLiteDatabase db;

    public TestDao(Context context, String SqliteName) {
	super(context, SqliteName);
	this.db=super.getDb();
    }
    
    public void TestDate(){
	String[] date=new String[8];
	date[0]="环境";
	date[1]="外观";
	date[2]="外泄露";
	date[3]="开关灵活性";
	date[4]="内泄露";
	date[5]="出水检查";
	date[6]="压力仪表观察";
	date[7]="排气工况观察";
	List<ContentValues> list=new ArrayList<ContentValues>();
	for(int i=0;i<8;i++){
	    ContentValues value=new ContentValues();
		value.put("number", i+1);
		value.put("name", date[i]);
		value.put("forcedpictures", "0");
		value.put("type", "1");
		list.add(value);
	}
	super.insertALL(list, DbTableName.DEVICEITEM);
	list.clear();
	ContentValues  value=new ContentValues();
	value.put("name", "良好");
	value.put("number", 1+"");
	value.put("itemNumber", 1+"");
	list.add(value);
	ContentValues  value1=new ContentValues();
	value1.put("name", "警告");
	value1.put("number", 2+"");
	value1.put("itemNumber", 1+"");
	list.add(value1);
	ContentValues  value2=new ContentValues();
	value2.put("name", "良好");
	value2.put("number", 3+"");
	value2.put("itemNumber", 2+"");
	list.add(value2);
	
	ContentValues  value3=new ContentValues();
	value3.put("name", "一般");
	value3.put("number", 4+"");
	value3.put("itemNumber", 2+"");
	list.add(value3);
	
	ContentValues  value4=new ContentValues();
	value4.put("name", "一般");
	value4.put("number", 4+"");
	value4.put("itemNumber", 2+"");
	list.add(value4);
    }
          
   
     
}
